package com.mercycrazy.recruit.dao;

import com.mercycrazy.recruit.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

/**
 * User Dao 接口定义
 *
 * @author <a href="mailto:1443424326@qq.com">mercycrazy</a>
 * @since 2023-01-14
 */
public interface UserDao extends JpaRepository<User, String> {

    /**
     * 根据手机号查找用户, 手机号是唯一索引
     */
    Optional<User> findByMobile(String mobile);
}
